package com.qfedu.service.impl;

import com.qfedu.entity.Orders;
import com.qfedu.mapper.OrderMapper;
import com.qfedu.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 作者：刘随阳
 * 时间: 2021/9/25 10:54
 * 描述：神光照耀,太白成瑞。六丙来迎,百福悠归
 */
@Service
public class OrderServiceImpl  implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public boolean updateOrder(String orderId) {
        Orders orders = orderMapper.selectByPrimaryKey(orderId);
        if(orders == null){
            return false;
        }
        orders.setOrderStatus(2);
        orderMapper.updateByPrimaryKey(orders);
        return true;
    }

    @Override
    public int getProductId(int dateId) {
        return 0;
    }
}
